function addleftnav(list,addarea){
	var total = "";
	for (var i=0;i<list.length;i++){
		var str ="<dl><dd><div style='background-image: url("+list[i].headimg+");'></div>"+list[i].title+"</dd><dt>";
		for (var j=0;j<list[i].content.length;j++) {
			str+="<li><a href='#'>"+list[i].content[j]+"</a></li>";
		}
		str+="</dt></dl>";
		total+=str;
	}
	$(addarea).append(total);
}

function addrankItem(list){
	imgs = ["img/meizhuanghead/first.png","img/meizhuanghead/second.png","img/meizhuanghead/third.png","img/meizhuanghead/forth.png","img/meizhuanghead/fifth.png"];
	$("#footerAdvantage_article").html("");
	var str = "";
	for (var i=0;i<list.header.length;i++) {
		var st = list.header[i].name.toString();
	  	str+= "<dl><img src="+imgs[i]+" class='rank'><dt><img src="+list.header[i].title_img+"></dt><dd><li  title="+st+"><a href='#'>"+list.header[i].name+"</a></li><li>"
	    for (var j=0;j<list.header[i].commenditem;j++) {
	    	str+="<img src='img/meizhuanghead/star_16x16_on.png'/>";
	    }
	   str+="</li><li>"+list.header[i].commend+"</li></dd></dl>";
	}
	$("#footerAdvantage_article").append(str);
	$("#footerAdvantage_footer").html("");
	var strfoot = "";
	for (var t=0;t<list.footer.length;t++) {
		strfoot+="<a href='#'><img src="+list.footer[t]+"/></a>";
	}
	$("#footerAdvantage_footer").append(strfoot);
}

function navChnage(){
		var logoimgs = ["img/meizhuanghead/liminttime.jpg","img/meizhuanghead/protect.jpg","img/meizhuanghead/hotkind.jpg","img/meizhuanghead/china.jpg","img/meizhuanghead/bank.jpg"];
	$("#footerAdvantage nav li:nth-child(n+3)").hover(function(){
		$(this).children().css("display","block");
		var index = $(this).attr("index");
		addrankItem(toplist[index]);
		$("#logoimg").attr("src",logoimgs[index]);
	},function(){
		$(this).children().css("display","none");
	});
}


